package com.peter.design.pattern.chain.auth.optimiaze;

import com.peter.design.pattern.chain.auth.Member;

/**
 * @Auther: 肖冬
 * @Date: 2020/7/31 00:52
 * @Description: old基础上优化
 */
public class AuthHndler extends Handler {
    @Override
    public void doHandler(Member member) {
        if(!"管理员".equals(member.getRoleName())){
            System.out.println("您不是管理员，没有操作权限");
            return;
        }
        System.out.println("允许操作");
    }
}
